package interfaces

import (
	"github.com/gin-gonic/gin"
	"net/http"
	"ruoyi/application"
	"ruoyi/utils"
)

type Online struct {
	op application.OperationLogAppInterface
}

//captcha constructor
func NewOnline(op application.OperationLogAppInterface) *Online {
	return &Online{
		op: op,
	}
}

func (o *Online) ListOnLine(context *gin.Context) {

	context.JSON(http.StatusOK, gin.H{
		"msg":  "操作成功",
		"code": http.StatusOK,
		"data": "",
	})
}

func (o *Online) DeleteOnLine(context *gin.Context) {
	var tokenId = context.Param("tokenId")
	var result = o.op.DeleteOperationLog(utils.Split(tokenId))
	context.JSON(http.StatusOK, result)
}
